<template>
  <div class="school">
    <h2>学校名称： {{ name }}</h2>
    <h2>学校地址: {{ address }}</h2>
  </div>
</template>

<script>
export default {
  name: "Student",
  data() {
    return {
      name: "天津123456",
      address: "西青",
    };
  },
  mounted() {
    console.log('School',this);
    this.$bus.$on('hello',(data) => {
      console.log('我是school',data);
    })
  },
  beforeDestroy() {
    this.$bus.$off('hello')
  }
};
</script>

<style scoped>
.school {
  background: rgb(185, 150, 150);
}
</style>